<?php

namespace App\Admin\Extensions\Tools;

use Encore\Admin\Admin;
use Encore\Admin\Grid\Tools\AbstractTool;
use Illuminate\Support\Facades\Request;

class XiadanGender extends AbstractTool
{
    protected function script()
    {
        $url = Request::fullUrlWithQuery(['gender' => '_gender_']);

        return <<<EOT

        $("#xiadan").click(function(){
            $("#filter-modal").css({'display':'block'});
        })

EOT;
    }

    public function render()
    {
        Admin::script($this->script());
        return view('admin.tools.xiadan');
    }
}